<script type="text/javascript">
    // 定义一些公共的属性和方法
    // const host = 'drenal.cn/health/user'
    const host = 'localhost/health/user';
    const port = '8989';
    // const apiUrl = 'http://' + host + ':' + port;
    // const apiUrl = 'http://127.0.0.1:8989/health/user';
    const apiUrl = 'http://drenal.cn:8989/health/user';
    const apiAdmission = 'http://drenal.cn:8989/health/admission';
    // const apiUrl = 'http://127.0.0.1:8989/health/user';
    // const apiAdmission = 'http://127.0.0.1:8989/health/admission';
    // const apiUrl = 'http://127.0.0.1:8989/health/user';
    // const apiAdmission = 'http://127.0.0.1:8989/health/admission';
    // 登录状态
    let loginState = {
        id: "-1",
        role: "0"
    }

    function setLoginState(state) {
        loginState = state;
    }
    
    function getLoginState() {
        return loginState;
    }
    // 暴露出这些属性和方法
    export default {
        apiUrl,
        apiAdmission,
        host,
        port,
        setLoginState,
        getLoginState
    }
</script>